package com.ciaojian.core.bytedance;


import com.ciaojian.core.enums.base.IBaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
public enum MiniAppRequestApi {
    /**
     * 账号授权  post
     * 用于不需要用户授权就可以调用的接口。
     * 生成 client_token
     * Content-Type:multipart/form-data
     */
    CLIENT_TOKEN("POST","https://open.douyin.com/oauth/client_token/"),

    ACCESS_TOKEN("POST","https://open.douyin.com/oauth/access_token/"),

    /**
     * 小程序授权
     */
    ACCESS_TOKEN_V2("HTTPPOST","https://developer.toutiao.com/api/apps/v2/token"),

    /**
     * 小程序用户登录
     */
    CODE2SESSION("HTTPPOST","https://developer.toutiao.com/api/apps/v2/jscode2session"),

    /**
     * 发起店铺匹配 POI 同步任务 post
     * Content-Type:application/json
     */
    POI_SUPPLIER("HTTPPOST","https://open.douyin.com/poi/v2/supplier/match/?access_token="),

    /**
     *店铺匹配任务结果查询 get
     * Content-Type:application/json
     */
    POI_QUERY_TASK("HTTPGET","https://open.douyin.com/poi/v2/supplier/query/task/?supplier_task_ids="),

    /**
     * 商铺同步 post
     * Content-Type:application/json
     */
    POI_SYNC_STORE("HTTPPOST","https://open.douyin.com/poi/supplier/sync/?access_token="),

    /**
     * 查看商铺
     */
    POI_QUERY_STORE("HTTPGET","https://open.douyin.com/poi/supplier/query/?supplier_ext_id="),


    /**
     * 应用保存商品
     */
    PRODUCT_SAVE_URL("HTTPPOST","https://open.douyin.com/life/goods/product/save/?access_token="),

    /**
     * 商户余额查询 (担保支付)
     */
    QUERY_MERCHANT_BALANCE("HTTPPOST","https://developer.toutiao.com/api/apps/ecpay/saas/query_merchant_balance")

    ;



    /**
     * 类型
     */
    private final String requestType;
    private final String url;


    MiniAppRequestApi(String requestType,String url) {
        this.requestType = requestType;
        this.url = url;
    }

    public String getRequestType() {
        return requestType;
    }
    public String getUrl() {
        return url;
    }

}
